<template>
  <div>
    <Selector ref="selector" v-model="selector" :initValue="options[0].value" :options="options" />
    <p>selector:{{ selector }}</p>
  </div>
</template>

<script>
import Selector from './Selector';
export default {
  name: 'Form',
  data() {
    return {
      selector: '',
      options: [
        {
          value: '选项1',
          label: '黄金糕',
        },
        {
          value: '选项2',
          label: '双皮奶',
          disabled: true,
        },
        {
          value: '选项3',
          label: '蚵仔煎',
        },
        {
          value: '选项4',
          label: '龙须面',
        },
        {
          value: '选项5',
          label: '北京烤鸭',
        },
      ],
    };
  },
  components: {
    Selector,
  },
  watch:{
    selector(){
      console.log('this.refs', this.$refs.selector)
    }
  }
};
</script>

<style></style>
